﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucShortSearchBar.ascx.cs"
    Inherits="ExpertMIS.UserControl.ucShortSearchBar" %>
<style type="text/css">
    .ssb-td
    {
        width: 90px;
        text-align: center;
        vertical-align: middle;
        height:20px;
        line-height:20px;        
    }
</style>
<script type="text/javascript">
    function onSubmit() {
        if ($('#nav_search').val() == $('#nav_search').attr('prompt')) { $('#nav_search').val(''); }
    }
</script>
<form id="frmSearch" action='<% Response.Write(ResolveUrl("~/Forums/SearchResult.aspx")); %>' onsubmit="return onSubmit();">
<table>
    <tr>
        <td class="ssb-td">
            <input id="nav_search" style="height: 20px; vertical-align:middle;line-height:20px;" name="q" type="text" value='<%= GetSearchKey() %>' prompt='<%= GetPromptString() %>' onfocus="if($(this).val() == $(this).attr('prompt')){$(this).val('');}" onblur="if($(this).val()=='') $(this).val($(this).attr('prompt'));" />
        </td>
        <td class="ssb-td">
            <input id="ask_btn" type="button" onclick="var f=$('#frmSearch');if(f.length>0){f[0].action='<% Response.Write(ResolveUrl("~/Forums/PostQuestion.aspx")); %>';f[0].submit();}" />
        </td>
        <td class="ssb-td" style="text-align: left;">
            <input id="search_btn" name="search_btn" type="submit" value="" />
        </td>
    </tr>
</table>
</form>
